package com;

/**
 * <b>com.TeacherReturnVisitCommunicationStatusEnum.java</b></br>
 *
 * <pre>
 * 教员回访节点沟通状态
 * </pre>
 *
 * @author zhoulihao xiaogezhou929@163.com
 * @date 2021年05月08日 11:52:58
 * @since JDK 1.8
 */
public enum TeacherReturnVisitCommunicationStatusEnum {
	DEFAULT(0, ""), COMMUNICATION_STATUS_ONE(1, "待沟通"),//
	COMMUNICATION_STATUS_TWO(2, "无有效沟通记录"), //
	COMMUNICATION_STATUS_THREE(3, "已沟通"),//
	COMMUNICATION_STATUS_FOUR(4, "超时未沟通"),//
	COMMUNICATION_STATUS_FIVE(5, "超时已沟通");//

	private final int code;
	private final String msg;

	TeacherReturnVisitCommunicationStatusEnum(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}

	public static TeacherReturnVisitCommunicationStatusEnum getByCode(int code) {
		TeacherReturnVisitCommunicationStatusEnum[] arr = TeacherReturnVisitCommunicationStatusEnum
				.values();
		for (TeacherReturnVisitCommunicationStatusEnum teacherReturnVisitCommunicationStatusEnum : arr) {
			if (code == teacherReturnVisitCommunicationStatusEnum.getCode()) {
				return teacherReturnVisitCommunicationStatusEnum;
			}
		}

		return DEFAULT;
	}
}
